#include <iostream>
using std::cout;
using std::endl;

int i = 1;

class Test
{
public:
	Test()
	:_first(i++) //first = 1 , i = 2
	,_second(i++) //second = 2 , i = 3
	,_third(i++) //third = 3 , i = 4
	,_fourth(_third) 
	{
		_third = i; //third = 4, fourth = 4
	}
	void print()
	{
		cout << "result : " << _first + _second + _third + _fourth << endl;
	}
private:
	int _first;
	int _second;
	int _third;
	int &_fourth;
};

int main()
{
	Test test;
	test.print();

	return 0;
}
